package city.spring.modules.consumptionItem.vo;

import city.spring.modules.consumptionItem.entity.ConsumptionItemsEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 视图层数据
 * pxm
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ConsumptionItemsEntityVO extends ConsumptionItemsEntity {
    /**
     * 类别名称
     */
    private String categoryName;

    /**
     * 父级类别ID
     */
    private String pid;

    /**
     * 该消费项目关联的床位信息
     */
    private List<ProjectBedRelationEntityVO> beds;

    public ConsumptionItemsEntityVO() {
    }

    public ConsumptionItemsEntityVO(ConsumptionItemsEntity entity) {
        super.setId(entity.getId());
        super.setCategoryId(entity.getCategoryId());
        super.setChargeWay(entity.getChargeWay());
        super.setType(entity.getType());
        super.setCost(entity.getCost());
        super.setDescribes(entity.getDescribes());
        super.setEffectiveDate(entity.getEffectiveDate());
        super.setFrequency(entity.getFrequency());
        super.setTimeNeed(entity.getTimeNeed());
        super.setType(entity.getType());
        super.setName(entity.getName());
        super.setChildren(entity.getChildren());
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
